package com.jt.tenant.conn;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

@HttpInlet(Conn.INLET_USER_REGISTER)
public class GetRegisterUser extends JTAsyGet<GetRegisterUser.Info> {

    public String phone = "";

    public String password = "";

    public String loginType = "";

    public String weChat = "";

    public String qq = "";

    public GetRegisterUser(AsyCallBack asyCallBack) {

        super(asyCallBack);

    }

    @Override
    protected Info parser(JSONObject object) {

        JSONObject apiTYF = object.optJSONObject("apiTYF");

        JSONObject head = apiTYF.optJSONObject("head");

        JSONObject body = apiTYF.optJSONObject("body");

        Info info = new Info();

        info.msg = head.optString("msg");

        JSONObject session = body.optJSONObject("session");

        info.id = session.optString("id");

        info.obdId = session.optString("obdId");

        info.createtime = session.optString("createtime");

        info.token = session.optString("token");

        info.updatetime = session.optString("updatetime");

        info.userId = session.optString("userId");

        info.expriationTime = session.optString("expriationTime");

        return info;


    }

    public static class Info {

        public String msg;

        public String code, id, obdId, createtime, token, updatetime, userId, expriationTime;

    }

}
